/*
 * @Author: zxc
 * @Date: 2020-11-04 15:06:06
 * @LastEditTime: 2020-11-22 11:11:03
 * @LastEditors: zxc
 * @Description:
 */
import { getCurrentInstance } from "vue"

export function useFuncEmit(fn: (_instance: any) => Promise<void> | void): any {
  const instance = getCurrentInstance()

  if (instance) {
    fn.call(null, instance)
  }
}
